<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head lang="en">
    <meta charset="UTF-8">
    <%@include file="style.jsp" %>
    <%@include file="script.jsp" %>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/orderlang/distributor/css/add_customer.css"/>
    <title>我的订货郎</title>
</head>
<body>
<div id="container_1" style="height:100%">
    <div style="position: relative">
        <%@include file="header.jsp" %>
    </div>
    <div id="content" class="clearfix">
        <%@include file="left_menu.jsp" %>
        <!--内容部分-->
        <div class="right-content" style="margin:75px 50px 0 213px;">
            <p class="brand">
                <a>客户</a>><a href="${pageContext.request.contextPath}/customer/listCustomer">客户查询</a>><a class="now">客户修改</a>
            </p>
            <div class="content-container" style="height: 800px;">
                <div class="message-form">
                    <form action="${pageContext.request.contextPath}/customer/updateCustomer" method="post" >
                        <h4>基础资料</h4>
                        <div class="basic clearfix">
                            <div class="left-block fl clearfix">
                                <div class="account-number">
                                    <span><b>*</b>登录账号</span>
                                    <input name="customerId" class="long" type="text" value="${distributorCustomer.customerId }" style="display: none;"/>
                                    <input name="systemName" class="long" type="text" value="${customer.systemName }" placeholder="请输入客户登录账号" />
                                </div>
                                <div class="customer-name">
                                    <span>客户名称</span>
                                    <input name="name" id="customer-name" class="long" value="${customer.name }" type="text" />
                                </div>
                                <div class="addr-content clearfix">
					               <div class="fl"><i>*</i>联系地址</div>
					                    <select data-placeholder="省份" name="provinceID" id="provinceId" class="province" data-rel="chosen">
						                </select>
					                   <select data-placeholder="城市" name="cityId" id="cityId" class="city" data-rel="chosen">
						               </select>
					            </div>
                                <div class="address-detail">
                                    <input name="address"  id="address-detail" value="${distributorCustomer.address }" class="long" type="text" placeholder="请输入详细地址"/>
                                </div>
                                <div class="remarks">
                                    <span>备注</span>
                                    <textarea name="remark" cols="30" rows="10">${distributorCustomer.remark }</textarea>
                                </div>
                            </div>
                            <div class="right-block fl clearfix">
	                              <c:if test="${distributorCustomer.isUse==1}">
                                <div class="account-status">
                                    <span>账号状态</span>
                                    <label for="true" class="status on">
                                        <input type="radio" name="state" id="true" value="true"/>
                                        开启
                                    </label>
                                    <label for="false" class="status">
                                        <input type="radio" name="state" id="false" value="false"/>
                                        禁止
                                    </label>
                                </div>
                            </c:if>
                            <c:if test="${distributorCustomer.isUse==0}">
                                <div class="account-status">
                                    <span>账号状态</span>
                                    <label for="true" class="status">
                                        <input type="radio" name="state" id="true" value="true"/>
                                        开启
                                    </label>
                                    <label for="false" class="status on">
                                        <input type="radio" name="state" id="false" value="false"/>
                                        禁止
                                    </label>
                                </div>
                            </c:if>
                                <div class="customer-number">
                                    <span><b>*</b>客户编号</span>
                                    <input class="long" name="code" value="${distributorCustomer.code }" type="text" placeholder="请输入客户编号"/>
                                </div>
                                <div class="customer-type clearfix select-box">
                                    <span class="fl"><b>*</b>客户类型</span>
                                    <div class="fl">
                                        <span>▼</span>
                                        <input type="text" readonly class="short show" placeholder="请选择客户类型" />
                                        <input type="text" id="customerTypeId" value="${distributorCustomer.customerTypeId }" readonly class="short" name="customerTypeId" style="display: none;"/>
                                        <ul class="hide">
                                        	<c:forEach var="customerType" items="${allCustomerType}">
                                        	 <li data-id="${customerType.id }">${customerType.type }</li>
                                        	</c:forEach>
                                        </ul>
                                    </div>
                                </div>
                                <div class="content-msg clearfix">
                                    <div class="content-name">
                                        <span>联系人</span>
                                        <input class="short" type="text" value="${distributorCustomer.contact }" name="contact" placeholder="请输入联系人"/>
                                    </div>
                                    <div class="content-phone">
                                        <span><b>*</b>手机</span>
                                        <input class="short" type="text" value="${distributorCustomer.tel }" name="tel" placeholder="请输入联系人电话号码"/>
                                    </div>
                                </div>
                                <div class="content-msg clearfix">
                                    <div class="content-name">
                                        <span>电子邮箱</span>
                                        <input class="short" type="text" value="${distributorCustomer.email }" name="email" placeholder="请输入电子邮箱"/>
                                    </div>
                                    <div class="content-phone">
                                        <span>QQ</span>
                                        <input class="short" type="text" value="${distributorCustomer.qq }" name="qq" placeholder="请输入QQ号码"/>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <h4>业务信息</h4>
                        <div class="sales-clerk clearfix select-box">
                            <span class="fl"><b>*</b>所属业务员</span>
                            <div class="fl">
                                <span>▼</span>
                                <input type="text" readonly class="long show"  value="${distributorCustomer.distributorUserId }" />
                                <input type="text" id="distributorUserId" name="distributorUserId" value="${distributorCustomer.distributorUserId }" readonly style="display: none;"/>
                                <ul class="hide">
                                    <c:forEach var="distributorUser" items="${allDistributorUser}">
                                     	 <li data-id="${distributorUser.id }">${distributorUser.name }</li>
                                   	</c:forEach>
                                </ul>
                            </div>
                        </div>
                        <div class="payment">
                            <span><b>*</b>付款方式</span>
                            <input id="settlementType" type="text" value="${distributorCustomer.settlementType }" style="display: none;">
                            <label for="now" class="pay-way">现付</label>
                            <input type="checkbox" name="settlementType" id="now" value="现付"/>
                            <label for="advance" class="pay-way">预付</label>
                            <input type="checkbox" name="settlementType" id="advance" value="预付"/>
                            <label for="after" class="pay-way">后付</label>
                            <input type="checkbox" name="settlementType" id="after" value="后付"/>
                        </div>
                        <h4>财务信息</h4>
                        <div class="left-block fl">
                            <div class="account-number">
                                <span>开户名称</span>
                                <input class="long" name="accountName" type="text" value="${customer.accountName }" placeholder="请输入开户名称"/>
                        </div>
                            <div class="account-number">
                                <span>开户银行</span>
                                <input class="long" name="bank" type="text" value="${customer.bank }" placeholder="请输入开户银行"/>
                            </div>
                            <div class="account-number">
                                <span>纳税人识别号</span>
                                <input class="long" name="taxpayerIdNum" value="${customer.taxpayerIdNum }" type="text" placeholder="请输入纳税人识别号"/>
                            </div>
                        </div>
                        <div class="right-block fl">
                            <div class="account-number">
                                <span>银行账号</span>
                                <input class="long" name="account" type="text" value="${customer.account }" placeholder="请输入银行账号"/>
                            </div>
                            <div class="account-number">
                                <span>开票抬头</span>
                                <input class="long" name="invoiceTitle" type="text" value="${customer.invoiceTitle }" placeholder="请输入开票抬头"/>
                            </div>
                        </div>
                        <input id="submit-btn" type="submit" style="display: none"/>
                        <input id="reset-btn" type="reset" style="display: none"/>
                    </form>
                </div>
                <div class="fixed-block">
                    <button class="btn-submit" onclick="$('#submit-btn').click()">保存</button>
                    <button class="btn-reset" onclick="$('#reset-btn').click()">取消</button>
                </div>
            </div>
        </div>
        <script src="${pageContext.request.contextPath}/static/orderlang/distributor/js/update_customer.js"></script>
        <!--内容部分结束-->
    </div>
</div>
</body>
</html>